using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CreateFood : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        InvokeRepeating("Create",50,1);
    }

    private void Create()
    {
        GameObject obj = FoodPool.ins.pool.Get();
        Vector3 pos = Random.insideUnitCircle*200;
        obj.transform.position = new Vector3(pos.x,0,pos.y) + transform.position;
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
